package com.itsu.compoment.socket;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 苏犇
 * @create time 2019/12/4 21:26
 */
@Data
@EqualsAndHashCode
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_msg")
public class Message implements Serializable {
    private static final long serialVersionUID = -9137338846595226658L;

    @TableId(type = IdType.AUTO)
    private int id;
    @TableField(value = "from_user_id")
    private String fromUserId;
    @TableField(value = "to_user_id")
    private String toUserId;
    @TableField(value = "content")
    private String content;
    @TableField(value = "stat")
    private String stat;
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date createTime;
}
